export const MDSET = 'SET'

export type mdState = {
  text: string
}

export type actionType = {
  type: string,
  payload: string
}

export const mdReducer = function (state: mdState, action: actionType) {
  switch (action.type) {
    case MDSET:
      return {text: action.payload}
    default:
      throw new Error("Wrong ActionType")
  }
}